package com.jrx.anytxn.reporting.job.xib.step;

import com.jrx.anytxn.common.uitl.DateUtils;
import com.jrx.anytxn.reporting.mapper.ext.ExtCmInteCoLonRepayDtlMapper;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ModifyRepayDtlListener implements JobExecutionListener {

    @Autowired
    @Resource
    private ExtCmInteCoLonRepayDtlMapper extCmInteCoLonRepayDtlMapper;

    @Override
    public void beforeJob(JobExecution jobExecution) {
        extCmInteCoLonRepayDtlMapper.deleteByEtlDt(DateUtils.parseDate("2022-12-09"));
    }

    @Override
    public void afterJob(JobExecution jobExecution) {

    }
}
